<!--
 * @Author: thinkido 4077725@qq.com
 * @Date: 2022-07-07 18:59:50
 * @LastEditors: thinkido 4077725@qq.com
 * @LastEditTime: 2022-07-11 17:23:40
 * @FilePath: \vue3vite-framework\src\views\Category.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup>
import { ref } from 'vue';

const count = ref(0);
const loading = ref(false);
const onRefresh = () => {
  setTimeout(() => {
    Toast('刷新成功');
    loading.value = false;
    count.value++;
  }, 1000);
};

</script>
<script>
export default {
  data() {
    return {
      list:[]
    }
  },
}
</script>

<template>
    
  <div class="c-page">
    <van-empty v-if="!list.length" description="暂无内容" />
    <van-pull-refresh v-else v-model="loading" @refresh="onRefresh">
      <p>刷新次数: {{ count }}</p>
    </van-pull-refresh>

  </div>
  
</template>

